package 第六周.practice;
//类是对象的蓝图。
public class Student {
//The fields of the class Student.
    String name;
    String Address;
    String Major;
    int GPA;//Grade point average.
    int credit;
    double weight;
  //The operations of the class student.
    public Student(){
        credit = 3;
        weight =  0.5;
    }
    public void setAddress(String tempaddress) {
        Address = tempaddress;
    }
    public void setMajor(String tempMajor){
        Major = tempMajor;
    }
    public int computeGPA(){
        GPA = (int) (credit*weight);
        return GPA;
    }
}

